import java.util.*;

public class Main {
    public  static int getMost(int[][] board) {
        int row = board.length;
        int wid = board[0].length;

        for (int i = 1; i < row; i++) {
            board[0][i] += board[0][i-1];
        }
        for (int i = 1; i < wid; i++) {
            board[i][0] += board[i-1][0];
        }

        for (int i = 1; i < row; i++) {
            for (int j = 1; j < wid; j++) {
                board[i][j] += Math.max(board[i][j-1],board[i-1][j]);
            }
        }
        return board[row-1][wid-1];
    }

    public static void main(String[] args) {

    }
}